<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sifremiunuttum.aspx.cs" Inherits="OnlineAnadolu.sifremiunuttum" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp;
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <table style="width: 409px">
            <tr>
                <td>
                    <asp:Label ID="lb_MailAdres" runat="server" Text="Mail adresiniz:"></asp:Label></td>
                <td colspan="2" style="width: 262px">
                    <asp:TextBox ID="tb_MailAdres" runat="server" Width="127px"></asp:TextBox>
                    <asp:DropDownList ID="DropDownList1" runat="server">
                        <asp:ListItem>@anadolu.edu.tr</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="height: 9px">
                </td>
                <td colspan="2" style="width: 262px; height: 9px">
                    &nbsp;<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
              <asp:Button ID="SubmitButton" runat="server" CommandName="Submit" Text="Sifremi Gonder" OnClick="SubmitButton_Click" />
                            <asp:Label ID="lb_GonderMesaji" runat="server" Width="192px"></asp:Label>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
        </table>
    
    </div>
        &nbsp; &nbsp;&nbsp;
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataSourceID="SqlDataSource1" OnRowDeleting="GridView1_RowDeleting"
            OnSelectedIndexChanged="GridView1_SelectedIndexChanged" Width="279px">
            <Columns>
                <asp:BoundField DataField="firstname" HeaderText="firstname" SortExpression="firstname" />
                <asp:BoundField DataField="gender" HeaderText="gender" SortExpression="gender" />
                <asp:BoundField DataField="lastvisit" HeaderText="lastvisit" SortExpression="lastvisit" />
                <asp:BoundField DataField="user_name" HeaderText="user_name" SortExpression="user_name" />
                <asp:BoundField DataField="phone" HeaderText="phone" SortExpression="phone" />
                <asp:BoundField DataField="phone2" HeaderText="phone2" SortExpression="phone2" />
                <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
                <asp:BoundField DataField="addressline1" HeaderText="addressline1" SortExpression="addressline1" />
                <asp:BoundField DataField="addressline2" HeaderText="addressline2" SortExpression="addressline2" />
                <asp:BoundField DataField="statename" HeaderText="statename" SortExpression="statename" />
                <asp:BoundField DataField="localname" HeaderText="localname" SortExpression="localname" />
                <asp:CommandField ButtonType="Button" SelectText="Sil" ShowSelectButton="True" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:shoppingConnectionString %>"
            SelectCommand="SELECT users.firstname, users.gender, users.lastvisit, users.user_name, contact.phone, contact.phone2, contact.email, address.addressline1, address.addressline2, states.statename, locals.localname FROM states INNER JOIN users INNER JOIN contact ON users.contactid = contact.contactinfoid INNER JOIN address ON users.addressid = address.addressid INNER JOIN department ON users.departmentid = department.departmentid ON states.pkid = address.stateid INNER JOIN locals ON address.localid = locals.fkid">
        </asp:SqlDataSource>
    </form>
</body>
</html>
